<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/vectrics.tld" prefix="vectrics" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<%@ page import="org.vectrics.recruiter.job.Job" %>
<%@ page import="org.apache.log4j.Logger" %>
<%@ page import="org.vectrics.recruiter.config.*" %>
<%@ page import="org.vectrics.recruiter.struts.admin.JobStatusReasonForm" %>

<jsp:useBean id="jobStatusReasonForm" class="org.vectrics.recruiter.struts.admin.JobStatusReasonForm" scope="request"/>

<vectrics:errors debug="true"/>

<%
	String value = (String)request.getAttribute("test");
	if (!value.equals("value")) {
		throw new RuntimeException("Could not find attribute");
	}
%>

<html:form action="/admin/jobs/reason/save" method="POST" focus="functionCode">
	<html:hidden property="jobId"/>

	<table>
		<tr>
			<td valign="TOP">
				<table width="600" cellpadding="4" cellspacing="1">
					<tr>
						<td class="formBg2">
							<font class="stdFont"><bean:message key="prompt.job.title"/></font>
						</td>
						<td class="formBg2">
							<font class="stdFont"><bean:write name="jobStatusReasonForm" property="jobTitle"/></font>
						</td>
					</tr>				
				
					<tr>
						<td class="formBg1" valign="top">
							<font class="formLabelClass"><bean:message key="prompt.job.reference.id"/></font>
							<vectrics:errors property="referenceId"/>
						</td>
						<td class="formBg1">
							<font class="stdFont"><bean:write name="jobStatusReasonForm" property="jobReferenceCode"/></font>
						</td>
					</tr>
				
					<tr>
						<td class="formBg2" valign="top">
							<font class="formLabelClass"><bean:message key="prompt.job.new.status"/></font>
							<vectrics:errors property="referenceId"/>
						</td>
						<td class="formBg2">
							<font class="stdFont"><bean:write name="jobStatusReasonForm" property="jobStatusName"/></font>
						</td>
					</tr>

					<tr>
						<td class="formBg1" valign="top"><font class="formLabelClass"><bean:message key="prompt.job.reason.type"/></font></td>
						<td class="formBg1" valign="top">
							<html:select name="jobStatusReasonForm" property="jobStatusReasonTypeCode" styleClass="formComboClass">
							  <html:options collection="statusReasonTypes" labelProperty="name" property="code"/>
							</html:select>
						</td>
					</tr>					

					<tr>
						<td valign="TOP" align="left"></td>
						<td valign="TOP" align="left">
							<vectrics:formButton elementId="ok.btn" code="button.ok" phraseCode="button.ok" value="submit" name="submit"/>&nbsp;
							<vectrics:formButton elementId="cancel.btn" code="button.cancel" phraseCode="button.cancel" value="cancel" name="cancel"/>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</html:form>